﻿using Marmat.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Marmat.Template.WinForm
{
    /// <summary>
    /// 
    /// </summary>
    public class BuildControlArgs : System.ComponentModel.CancelEventArgs
    {
        /// <summary>
        /// 控制器
        /// </summary>
        public object Controller { get; set; }

        /// <summary>
        /// 获取或设置生成的控件。
        /// </summary>
        public System.Windows.Forms.Control Control { get; set; }

        /// <summary>
        /// 获取字段名称。
        /// </summary>
        public string FieldName { get; internal set; }

        /// <summary>
        /// 获取字段的类型。
        /// </summary>
        public Type FieldType { get; set; }

        /// <summary>
        /// 获取或设置列的占位列数。
        /// </summary>
        public int ColumnSpen { get; set; }

        /// <summary>
        /// 开始新的一行
        /// </summary>
        public bool BeginGroup { get; set; } = false;

        /// <summary>
        /// 数据源
        /// </summary>
        public IBindingSource BindingSource { get; internal set; }
    }
}
